<?php
    $username = $this->session->userdata('username');
    $userid = $this->session->userdata('userid');
    $dropdown_data='';
    for($i=2012;$i>2000;$i--){
       if($i==2012){
            $dropdown_data['']='tous les';    
       }else{
           $dropdown_data[$i]=$i;
       } 
    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title><?php echo $page_title?></title>
    <META NAME="Description" CONTENT="">
    <link href="<?php echo base_url().'assets/css/'?>styles.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<?php echo base_url().'assets/jquery/'?>jquery-1.4.3.min.js"></script>
    <script type="text/javascript">
        $(document).ready(
        function(){
            $("#connexion").click
            (
            function()
            {
                $("#login_form").show(2000);
            }
            );
        }
        );
    </script>
</head>
<body style="background-color:#ededed" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">


<div id="headertop" align="center">
<div id="menuheadertop">
    <?php if($load_path=='home/index'){?>
    <img src="<?php echo base_url().'assets/css/'?>images/banner.png" style="position:absolute;right:0px;top:60px"/>
    <?php }?>
    <ul>
        <li><a href="<?php echo site_url();?>">Acceuil</a></li>
        <li><a href="<?php echo site_url('home/introduce');?>">A Propos</a></li>
        <li><a href="<?php echo site_url('home/contact');?>">Contact</a></li>
    </ul>
</div>
<!--END MENU HEADER TOP-->
<div id="logo">
    <a href="<?php echo site_url();?>" ><img border="0" style="margin-top:0px" src="<?php echo base_url().'/assets/css/'?>images/logo.png"/></a>
</div>
<!--END LOGO--> 
<!--END TOP-->

<div id="chung">
<div id="menuleft">
    <div id="listmenuleft">
        <ul>
            <li><div class="menu"><a href="<?php echo site_url();?>">ACCEUIL</a></div></li>
            <li><div class="menu"><a href="<?php echo site_url('home/introduce');?>">A PROPOS</a></div></li>
            <li><div class="menu"><a href="<?php echo site_url('home/contact');?>">CONTACT</a></div></li>
            <?php if($username != NULL){?>
                <li><div class="menu"><a href="<?php echo site_url('home/add_content');?>">POST CONTENT</a></div></li>

                <?php }?>   
                <li><div class="menu"><a href="<?php echo site_url('home/list_contents');?>">AVIS DE DECES</a></div></li>                    

        </ul>
        <!--END MENU-->
        <h1 style="text-transform: uppercase;">contenu de recherche :</h1>
        <form id="searchForm" name="searchForm" method="post" action="<?php echo site_url('home/de_recherche');?>">
            <table>
                <tr>
                    <td>par le nom de famille</td>
                    <td>prenom</td>
                    <td>année</td>
                </tr>
                <tr>
                    <td><input id="search" type="text" name="nom" /></td>
                    <td><input id="search1" type="text" name="prenom" /></td>
                    <td><?php echo form_dropdown('year_to_search',$dropdown_data,'','id="year"');?></td>
                </tr>                                                                                   
                <tr>
                    <td><div align="left"><input id="search" value="recherche" type="submit" name="search"/></div></td>
                </tr>
            </table>
            
        </form>
        <!--END RECHERCHER-->
    </div>
    <div align="left" style="padding:30px 0px 0px 0px">
        <?php if($username == NULL){?>
            <a id="connexion" href="">CONNEXION</a>
            <a id="inscription" href="<?php echo site_url('home/loadRegister')?>">INSCRIPTION</a>    
            <?php } else {?>
            <a id="connexion1" href="<?php echo site_url('home/logout')?>">LOGOUT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
            <?php } ?>
        <div id="sep3"><img src="<?php echo base_url().'assets/css/'?>images/sep3.png"/></div>
        <?php if(isset($username) && $username != NULL){
                include('userform.php');
            ?>
            <?php
            }else{
                $this->load->view('home/loginForm.php');
        }?>
        <!--END LOGIN BOX-->
    </div>
    </div>
    <div id="accueil">